<template>
<!-- 回款记录 -->
  <div class="page">
    <div class="operat">
      回款记录（共{{ count }}条）
    </div>
    <zm-table-data
      :data="tableParams.data"
      :columns="columns"
      :fetch="loadList"
      :table-params="tableParams"
    ></zm-table-data>
  </div>
</template>

<script>
import tableMixin from '@/mixins/zmTableMixin'
import { outstandColumns } from './const'
import {getPageList} from '@/api/src/returnedMoney'

export default {
  name: 'OutstandInfo',
  components: {},
  mixins: [tableMixin],
  props: {
    id: {
      type: String,
      default: ''
    },
    obj: {
      type: Object,
      default: {}
    }
  },
  data () {
    return {
      count: ''
    }
  },
  computed: {
    columns () {
      return outstandColumns(this)
    }
  },
  created () {},
  methods: {
    async loadList () {
      const res = await getPageList(
        this.assignQuery({ customerId: this.id })
      )
      this.count = res.count
      this.initialTableData(res.list, res.count)
    }
  }
}
</script>

<style scoped lang="scss">
.operat {
  height: 40px;
  line-height: 40px;
  margin-bottom: 10px;
}
</style>
